<template>
    <div class="wrap">
        <!-- <OrderList :status="status" :cancelOrderBtn="true"></OrderList> -->
        <OrderShowList 
            :data.sync="data" 
            :query.sync="query" 
            :pageHidden.sync="pageHidden" 
            :LoadDataFun="LoadDataList"
            :path="path"
            :title="title">
        </OrderShowList>
    </div>
</template>

<script>
import api from "@/api/order";
import { orderMenu } from "@/utils/common";
export default {
    data() {
        return {
            title: "全部订单",
            query: {
                page: 1,
                pageSize: 8,
                type: "all",
                keyword: ""
            },
            path: "",
            pageHidden: true,
            data: {
                total: 0,
                data: []
            }
        };
    },
    methods: {
        // 获取列表数据
        LoadDataList() {
            api.OrderAfterSale(this.query)
                .then((res) => {
                    this.data = res.data;
                    this.pageHidden = false;
                    if (this.query.pageSize >= this.data.total) {
                        this.pageHidden = true;
                    }
                    this.$nextTick(() => {
                        orderMenu();
                    });
                })
        },
    },
    mounted: function(){
        this.LoadDataList();
        this.path = this.$route.path; //获取地址栏
    }
};
</script>
<style>
   
</style>